Optimal. Leaf size=33 \[ -\frac {\csc ^2(x)}{2 a}-\frac {\tanh ^{-1}(\cos (x))}{2 a}+\frac {\cot (x) \csc (x)}{2 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.454, Rules used = {2706, 2606, 30, 2611, 3770} \[ -\frac {\csc ^2(x)}{2 a}-\frac {\tanh ^{-1}(\cos (x))}{2 a}+\frac {\cot (x) \csc (x)}{2 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2606
Rule 2611
Rule 2706
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cot (x)}{a+a \cos (x)} \, dx &=-\frac {\int \cot ^2(x) \csc (x) \, dx}{a}+\frac {\int \cot (x) \csc ^2(x) \, dx}{a}\\ &=\frac {\cot (x) \csc (x)}{2 a}+\frac {\int \csc (x) \, dx}{2 a}-\frac {\operatorname {Subst}(\int x \, dx,x,\csc (x))}{a}\\ &=-\frac {\tanh ^{-1}(\cos (x))}{2 a}+\frac {\cot (x) \csc (x)}{2 a}-\frac {\csc ^2(x)}{2 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 42, normalized size = 1.27 \[ -\frac {2 \cos ^2\left (\frac {x}{2}\right ) \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )+1}{2 a (\cos (x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 37, normalized size = 1.12 \[ -\frac {{\left (\cos \relax (x) + 1\right )} \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - {\left (\cos \relax (x) + 1\right )} \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) + 2}{4 \, {\left (a \cos \relax (x) + a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 34, normalized size = 1.03 \[ -\frac {\log \left (\cos \relax (x) + 1\right )}{4 \, a} + \frac {\log \left (-\cos \relax (x) + 1\right )}{4 \, a} - \frac {1}{2 \, a {\left (\cos \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 33, normalized size = 1.00 \[ \frac {\ln \left (-1+\cos \relax (x )\right )}{4 a}-\frac {1}{2 a \left (\cos \relax (x )+1\right )}-\frac {\ln \left (\cos \relax (x )+1\right )}{4 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.30, size = 31, normalized size = 0.94 \[ -\frac {\log \left (\cos \relax (x) + 1\right )}{4 \, a} + \frac {\log \left (\cos \relax (x) - 1\right )}{4 \, a} - \frac {1}{2 \, {\left (a \cos \relax (x) + a\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.34, size = 21, normalized size = 0.64 \[ \frac {2\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )-{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{4\,a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cot {\relax (x )}}{\cos {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________